"""sqlite add blog

Revision ID: 08361310dac2
Revises: 235ac4e83ee4
Create Date: 2025-11-17 13:53:34.539670

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '08361310dac2'
down_revision: Union[str, Sequence[str], None] = '235ac4e83ee4'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('blog',
    sa.Column('title', sa.String(length=128), nullable=False, comment='标题'),
    sa.Column('tags', sa.String(length=128), nullable=True, comment='标签'),
    sa.Column('content', sa.Text(), nullable=True, comment='内容'),
    sa.Column('stars', sa.Integer(), nullable=True, comment='赞'),
    sa.Column('create_by', sa.String(length=64), nullable=True, comment='创建者'),
    sa.Column('create_time', sa.DateTime(), nullable=True, comment='创建时间'),
    sa.Column('update_by', sa.String(length=64), nullable=True, comment='更新者'),
    sa.Column('update_time', sa.DateTime(), nullable=True, comment='更新时间'),
    sa.Column('remark', sa.String(length=500), nullable=True, comment='备注'),
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False, comment='参数主键'),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('blog')
    # ### end Alembic commands ###
